home *** CD-ROM | disk | FTP | other *** search
/ Loadstar 24 / 024.d81 / input demo (.txt) < prev    next >
Commodore BASIC  |  2022-08-26  |  2KB  |  77 lines

  1. 1 poke53280,0:poke53281,0
  2. 51 c$=chr$(147)
  3. 55 print c$:print"type in something"
  4. 58 print"notice the action of clr/home           and cursor keys":print
  5. 59 def "34=0"
  6. 60 input a$
  7. 65 :
  8. 70 rem predefined strings for def key command
  9. 72 nokey$="1-255=0"
  10. 76 crsr$="13=_,17=_,29=_,145=_,157=_,20=20,19=19,147=_,148=_"
  11. 78 n$="u='4,i='5,o='6,j='1,k='2,l='3,32='0,.=.,+=+,-=-,'0-'9=_"
  12. 80 numkey$=nokey$+","+n$+","+crsr$+",34=0"
  13. 82 f$="133='1,134='3,135='5,136='7,137='2,138='4,139='6,140='8"
  14. 84 fkey$=nokey$+","+f$
  15. 86 box$=nokey$+",a-z=_,13=_,19=_,147=_,157=_,20=2,29=_"
  16. 90 :
  17. 100 print c$:print"just try to get out of the box"
  18. 101 print"notice how the delete key works"
  19. 102 print"use shift-clr/home to clear box"
  20. 105 def box$
  21. 110 (NULL) 12,10:print"[176][195][195][195][195][195][195][195][195][195][195][195][195][174]"
  22. 120 (NULL) 12,11:print"[194]            [194]"
  23. 130 (NULL) 12,12:print"[173][195][195][195][195][195][195][195][195][195][195][195][195][189]"
  24. 150 (NULL) 13,11:input\11,x$
  25. 180 print c$:print"fill in the blank"
  26. 186 (NULL) 5,10:print"there are eight      in a byte"
  27. 190 (NULL) 21,10:input\4,a$
  28. 191 print:print
  29. 194 if a$="bits" then print"right on!"
  30. 195 if a$<>"bits" then print"sorry, the answer is bits"
  31. 196 (NULL) 14,18:input\1,"press return ";x$
  32. 199 :
  33. 200 print c$
  34. 201 print"notice that only numbers can be typed"
  35. 210 (NULL) 5,5:print"67+84="
  36. 220 def nokey$+",'0-'9=_,"+crsr$
  37. 230 (NULL) 12,5:input\3,n
  38. 300 :
  39. 400 def numkey$
  40. 405 (NULL) 1,1:print c$;"notice numerical keypad"
  41. 406 print"uio jkl   space bar"
  42. 410 (NULL) 5,5:input\19,"enter a number ";n
  43. 411 print c$
  44. 415 :
  45. 450 def nokey$+",y=y,n=n"
  46. 455 (NULL) 10,10:print"answer y or n"
  47. 460 get k$:if k$="" then 460
  48. 490 :
  49. 500 def fkey$ :rem define function keys
  50. 505 print c$:print"press function keys"
  51. 506 print"f8 to quit"
  52. 510 get k:if k=0 then 510
  53. 511 def:print:print
  54. 515 on k gosub 610,620,630,640,650,660,670,680
  55. 516 def "1-255=0,13=13"
  56. 520 input"press return";g$
  57. 530 goto 500
  58. 610 print"f1 routine":return
  59. 620 print"f2 routine":return
  60. 630 print"f3 routine":return
  61. 640 print"f4 routine":return
  62. 650 print"f5 routine":return
  63. 660 print"f6 routine":return
  64. 670 print"f7 routine":return
  65. 680 print"f8 routine"
  66. 790 :
  67. 800 printc$;"press f7 at any time for help"
  68. 805 def:def"136=1":rem def f7 as hot key
  69. 810 print:print
  70. 820 input 850,"enter something: ";x$
  71. 830 goto 820
  72. 850 print:print:print"you called for help?"
  73. 851 print"notice how f7 caused basic to jump out  of the input statement"
  74. 855 print"this is the end of the demo"
  75. 860 print:print"good bye"
  76. 999 def
  77.